package org.jground.rx.def.apps.cip;
import org.jground.rx.*;
import org.jground.rx.gen.*;
import org.jground.util.*;
import java.util.List;
import org.jground.rx.def.apps.accounting.*;
import org.jground.rx.def.apps.commons.*;
import org.jground.rx.def.apps.knowledge.*;
import org.jground.rx.def.*;
import org.jground.rx.def.apps.crm.*;
import org.jground.rx.def.apps.core.*;
import org.jground.rx.def.apps.legal.*;
import org.jground.rx.def.apps.ipm.*;
@SuppressWarnings("unused")
public class Project extends GenRoot {

    public static final String moid = "org.jground.rx.def.apps.cip.Project";

    private static final String projectNumber ="projectNumber";
    private static final String projectName ="projectName";
    private static final String startDate ="startDate";
    private static final String $CREATOR ="$CREATOR";

    public static final class AttName {
        public static final String projectNumber ="projectNumber";
        public static final String projectName ="projectName";
        public static final String startDate ="startDate";
        public static final String $CREATOR ="$CREATOR";
    }

    public static Project createNew() { return new Project(RXObjectService.getInstance().create(moid)); }

    public static Project getById(String oid) { 
        IRXObject mod = RXObjectService.getInstance().getById(oid);
        if(mod == null) { return null; }
        return new Project(mod);
    }

    public static Project[] getByIds(String... oids) { 
        List<IRXObject> mods = RXObjectService.getInstance().getByIds(moid, oids);
        Project[] res = new Project[mods.size()];
        int i = 0;
        for(IRXObject mod : mods) {
            res[i] = new Project(mod);
            i++;
        }
        return res;
    }

    public static SearchCriteria newSearchCriteria() {
        return  SearchCriteria.create(moid);
    }

    public static Project[] search(SearchCriteria sc) {
        return  wrap(GenRoot._search(sc));
    }

    public static Project[] wrap(List<? extends IRXObjectSynopsis> mods) { 
        Project[] res = new Project[mods.size()];
        int i = 0;
        for(IRXObjectSynopsis mod : mods) {
            res[i] = new Project(mod);
            i++;
        }
        return res;
    }

    public static Project wrap(IRXObjectSynopsis mod) { 
        return new Project(mod);
    }

    private Project(IRXObjectSynopsis rxObject) {this.rxObject = (IRXObject) rxObject;}

    public static String getProjectNumberLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, projectNumber).getLabel();
    }

    public static String getProjectNumberDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, projectNumber).getDescription();
    }

    public void setProjectNumber(String string) {
        rxObject.set(projectNumber, _to_String(string));
    }

    public String getProjectNumber() {
        return _to_String(rxObject.getCurrentValue(projectNumber));
    }

    public static String getProjectNameLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, projectName).getLabel();
    }

    public static String getProjectNameDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, projectName).getDescription();
    }

    public void setProjectName(String string) {
        rxObject.set(projectName, _to_String(string));
    }

    public String getProjectName() {
        return _to_String(rxObject.getCurrentValue(projectName));
    }

    public static String getStartDateLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, startDate).getLabel();
    }

    public static String getStartDateDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, startDate).getDescription();
    }

    public void setStartDate(String dateValue) {
        rxObject.set(startDate, _to_String(dateValue));
    }

    public String getStartDate() {
        return _to_String(rxObject.getCurrentValue(startDate));
    }

    public static String get$CREATORLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, $CREATOR).getLabel();
    }

    public static String get$CREATORDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, $CREATOR).getDescription();
    }

    public void set$CREATOR(String string) {
        rxObject.set($CREATOR, _to_String(string));
    }

    public String get$CREATOR() {
        return _to_String(rxObject.getCurrentValue($CREATOR));
    }

}
